//
//  LMTabBarController.m
//  彩票
//
//  Created by 张青花 on 15/9/15.
//  Copyright (c) 2015年 李明. All rights reserved.
//

#import "LMTabBarController.h"
#import "LMTabbar.h"
@interface LMTabBarController ()<LMTabbarDelegate>


@end

@implementation LMTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    LMTabbar *tabbar= [[LMTabbar alloc]  initWithFrame:self.tabBar.bounds];
    for (int i = 0; i<5; i++) {
        NSString *imageName = [NSString stringWithFormat:@"TabBar%d",i+1];
        NSString *selectImageName = [NSString stringWithFormat:@"TabBar%dSel",i+1];
        [tabbar addTabbarBtnWithNornalImage:imageName selImg:selectImageName];
        
    }
    
    
    tabbar.delegate = self;
    
    [self.tabBar addSubview:tabbar];
    
}

- (void)tabbar:(LMTabbar *)tabbar didSelectedFrom:(NSInteger)from to:(NSInteger)to
{
    self.selectedIndex = to;
}



@end
